<template>
	<view class="container">
		<block v-for="(item,index) in dataList" :key="index">
			<uni-card :is-shadow="true" :title="'车牌:'+item.plateNumber" >
				<view>
					进场时间:{{item.entranceTime}}
				</view>
				<view>
					进场通道:{{item.entranceGateName}}
				</view>
					
				<block v-if="item.isEit==1">
					<view>
						出场时间:{{item.exitTime}}
					</view>
					<view>
						出场通道:{{item.exitGateName}}
					</view>
				</block>
				<view class="car_status">
					<text style="font-size: 26rpx;font-weight: 700;color: #FFFFFF;">已出场</text>
				</view>
			</uni-card>
		</block>
		<empty v-if="dataList.length==0"></empty>
	</view>
</template>

<script>
	import {getList} from "@/api/record.js";
	export default {
		data() {
			return {
				showLicenseDialog: false, //是否显示添加车牌的dialog
				car:'',
				avatar:"",
				dataList:[]
			}
		},
		onLoad() {
			console.log("yangzl");
			
		},
		onShow(){
			this.getList()
		},
		methods: {
			getList(){
				getList().then((res)=>{
					if(res.data.code==0){
						this.dataList=res.data.data
					}
					console.log("res",res);
				})
			},
			
			
		}
	}
</script>

<style scoped lang="less">
	.container{
	  width:750rpx;
	  
	}
	.add-btn{
		width: 702rpx;
		height: 80rpx;
		background: #40C7B8;
		border-radius: 156rpx;
		opacity: 1;
		margin-left:24rpx;
		color:white;
		
	}
	.car_status{
		position: absolute;
		top:0;
		right:0px;
		padding-left:20rpx;
		padding-right: 20rpx;
		height: 48rpx;
		background: linear-gradient(360deg, #0193C8 0%, #02BFF1 100%);
		border-radius: 20rpx 0rpx 20rpx 0rpx;
		display: flex;
		flex-direction: row;
		align-items: center;
	}
</style>